1 package xdoclet.util.betwixt;
2
3 import org.apache.commons.betwixt.ElementDescriptor;
4 import org.apache.commons.betwixt.strategy.PluralStemmer;
5
6 import java.util.Map;
7
8 /***
9 * Plural stemmer for Betwixt that just appends "Collection". This matches
10 * the Java Beans that {@link xdoclet.sdk.xgg.XGGPlugin} generate.
11 *
12 * @author <a href="mailto:aslak.hellesoy at bekk.no">Aslak Hellesøy</a>
13 * @version $Revision: 1.2 $
14 */
15 class CollectionPluralStemmer implements PluralStemmer {
16
17 public ElementDescriptor findPluralDescriptor( String propertyName, Map map ) {
18 String key = propertyName + "Collection";
19 ElementDescriptor result = (ElementDescriptor) map.get( key );
20 if( result == null ) {
21 throw new IllegalStateException("Couldn't find descriptor for " + key + ". Known property names: " + map.keySet() );
22 }
23 return result;
24 }
25 }
This page was automatically generated by Maven